home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2008 April
/
PCWorld_2008-04_cd.bin
/
komercni software
/
miton
/
SystemMechanic7Pro.exe
/
{app}
/
smhtml.dll
/
1033
/
HTML
/
INTERNETSECURITY.JS
< prev
next >
Wrap
Text File
|
2008-01-24
|
10KB
|
389 lines
function InternetSecurityPageOnLoad()
{
SetAntivirusLaunchButtonCaption(btLOC_LaunchAV);
SetFirewallLaunchButtonCaption(btLOC_LaunchFW);
SetAntivirusMoreInfoButtonCaption(btLOC_IS_MoreInfo);
SetFirewallMoreInfoButtonCaption(btLOC_IS_MoreInfo);
}
// Call it when page load
AddLoadEvent(InternetSecurityPageOnLoad);
//*************** internet security UI *********************************//
var IS_Red = "0";
var IS_Yellow = "1";
var ID_Green = "2";
var AV_MoreInfo_ID = -1;
var FW_MoreInfo_ID = -1;
function SetAntivirusLaunchButtonCaption(Value)
{
var b = new ActionButton()
b.ID = "btnAvLaunch";
b.Type = ACTION_BUTTON_CUSTOM;
b.Text = Value ;
b.Event = "external.DoOnAVLaunchButtonClick();";
b.Class = "button";
b.Width = btLOC_LaunchAV_width;
b.FloatClass = "floatR";
Get('spAvLaunch').innerHTML = b.Render();
}
function SetAntivirusMoreInfoButtonCaption(Value)
{
var b = new ActionButton()
b.ID = "btnAvMoreinfo";
b.Type = ACTION_BUTTON_CUSTOM;
b.Text = Value;//"More Info";
b.Event = "external.DoOnAVMoreInfoButtonClick(AV_MoreInfo_ID);";
b.Class = "button";
//b.Width = 145;
b.FloatClass = "floatR";
Get('spAvMoreInfo').innerHTML = b.Render();
}
function SetFirewallLaunchButtonCaption(Value)
{
var b = new ActionButton()
b.ID = "btnFwLaunch";
b.Type = ACTION_BUTTON_CUSTOM;
b.Text = Value;
b.Event = "external.DoOnFWLaunchButtonClick();";
b.Class = "button";
b.Width = btLOC_LaunchFW_width;
b.FloatClass = "floatR";
Get('spFwLaunch').innerHTML = b.Render();
}
function SetFirewallMoreInfoButtonCaption(Value)
{
var b = new ActionButton()
b.ID = "btnFwMoreinfo";
b.Type = ACTION_BUTTON_CUSTOM;
b.Text = Value;//"More Info";
b.Event = "external.DoOnFWMoreInfoButtonClick(FW_MoreInfo_ID);";
// b.Event = "alert( FW_MoreInfo_ID );";
b.Class = "button";
//b.Width = 145;
b.FloatClass = "floatR";
Get('spFwMoreInfo').innerHTML = b.Render();
}
function SetAntivirusStatus(State)
{
switch(State)
{
case IS_Red:
SetClass("spAVTitle", "IS_status_txt red");
Get("imgAV").src = "IS_icon_critical.gif";
break;
case IS_Yellow:
SetClass("spAVTitle", "IS_status_txt yellow");
Get("imgAV").src = "IS_icon_fair.gif";
break;
case ID_Green:
SetClass("spAVTitle", "IS_status_txt green");
Get("imgAV").src = "IS_icon_good.gif";
break;
}
}
function SetFirewallStatus(State)
{
switch(State)
{
case IS_Red:
SetClass("spFWTitle", "IS_status_txt red");
Get("imgFW").src = "IS_icon_critical.gif";
break;
case IS_Yellow:
SetClass("spFWTitle", "IS_status_txt yellow");
Get("imgFW").src = "IS_icon_fair.gif";
break;
case ID_Green:
SetClass("spFWTitle", "IS_status_txt green");
Get("imgFW").src = "IS_icon_good.gif";
break;
}
}
function SetAntivirusMoreInfoButtonID(Value)
{
AV_MoreInfo_ID = Value;
}
function SetFirewallMoreInfoButtonID(Value)
{
FW_MoreInfo_ID = Value;
}
function SetAntivirusText(Header, Details)
{
Get("spAVHeading").innerHTML = Header;
Get("spAVDetails").innerHTML = Details;
}
function SetFirewallText(Header, Details)
{
Get("spFWHeading").innerHTML = Header;
Get("spFWDetails").innerHTML = Details;
}
//Value: Boolean
function SetAntivirusLaunchButtonVisible(Value)
{
SetDisplayWidget('spAvLaunch', Value);
}
//Value: Boolean
function SetFirewallLaunchButtonVisible(Value)
{
SetDisplayWidget('spFwLaunch', Value);
}
//Value: Boolean
function SetAntivirusMoreInfoButtonVisible(Value)
{
SetDisplayWidget('spAvMoreInfo', Value);
}
//Value: Boolean
function SetFirewallMoreInfoButtonVisible(Value)
{
SetDisplayWidget('spFwMoreInfo', Value);
}
//Value: Boolean
function SetAntivirusMoreInfoTextVisible(Value)
{
SetDisplayWidget('spAVMoreInfoText', Value);
}
//Value: Boolean
function SetFirewallMoreInfoTextVisible(Value)
{
SetDisplayWidget('spFWMoreInfoText', Value);
}
function SetAntivirusMoreInfoText(Text)
{
Get("spAVMoreInfoText").innerHTML = URLDecode(Text);
}
function SetFirewallMoreInfoText(Text)
{
Get("spFWMoreInfoText").innerHTML = URLDecode(Text);
}
//Value: Boolean
function SetAntivirusOptionsVisible(Value)
{
SetDisplayWidget('divAVOptionsTable', Value);
}
//Value: Boolean
function SetFirewallOptionsVisible(Value)
{
SetDisplayWidget('divFWOptionsTable', Value);
}
function AddAntivirusOptionRow(RowID, Column1,Column2)
{
var t = new DataTable();
t.ID = "tblAVOptions";
t.Class = "tb_antivirus_details";
t.Width = "100%";
var col1 = "<div >" + URLDecode(Column1) + "</div>";
t.AddWithKey(RowID, col1, URLDecode(Column2));
if( Get( t._ClientID() ) == null )
Get("divAVOptionsTable").innerHTML += t.Render();
}
function AddFirewallOptionRow(RowID, Column1, Column2)
{
var t = new DataTable();
t.ID = "tblFWOptions";
t.Class = "tb_antivirus_details";
t.Width = "100%";
var col1 = "<div >" + URLDecode(Column1) + "</div>";
t.AddWithKey(RowID, col1, URLDecode(Column2));
if( Get( t._ClientID() ) == null )
Get("divFWOptionsTable").innerHTML += t.Render();
}
function EditAntivirusOptionRow(RowID, Column1, Column2)
{
var t = new DataTable();
t.ID = "tblAVOptions";
var col1 = "<div >" + URLDecode(Column1) + "</div>";
t.ChangeCellbyKey( col1 , RowID, 0);
t.ChangeCellbyKey( URLDecode(Column2) , RowID, 1);
}
function EditFirewallOptionRow(RowID, Column1, Column2 )
{
var t = new DataTable();
t.ID = "tblFWOptions";
var col1 = "<div >" + URLDecode(Column1) + "</div>";
t.ChangeCellbyKey( col1 , RowID, 0);
t.ChangeCellbyKey( URLDecode(Column2) , RowID, 1);
}
// Value : bool
function SetAntivirusSectionBusy(Value)
{
SetDisplayWidget('divAvTables', !Value);
SetDisplayWidget('tblAvLoading', Value);
}
// Value : bool
function SetFirewallSectionBusy(Value)
{
SetDisplayWidget('divFwTables', !Value);
SetDisplayWidget('tblFwLoading', Value);
}
// Value : bool
function SetAntivirusSectionAnalyzing(Value)
{
SetDisplayWidget('trAVData', !Value);
//SetDisplayWidget('divAVData', !Value);
SetDisplayWidget('divAVLoading', Value);
}
// Value : bool
function SetFirewallSectionAnalyzing(Value)
{
SetDisplayWidget('trFWData', !Value);
SetDisplayWidget('divFWLoading', Value);
}
// Value : bool
function SetAntivirusVerifyingVisible(Value)
{
SetDisplayWidget('trAVVerify', Value);
}
// Value : bool
function SetFirewallVerifyingVisible(Value)
{
SetDisplayWidget('trFWVerify', Value);
}
//*************** end internet security *********************************//
//*************** test functions *********************************//
function i1()
{
SetAntivirusText("Header", "Details");
SetAntivirusMoreInfoText("more infor text");
SetAntivirusLaunchButtonVisible(false);
SetAntivirusMoreInfoButtonVisible(true);
SetAntivirusMoreInfoTextVisible(false)
SetAntivirusMoreInfoButtonVisible(true);
//
SetAntivirusOptionsVisible(true);
SetFirewallOptionsVisible(true);
AddAntivirusOptionRow("s", "Last full system scan: <span class=\"bold red\">7/10/2007 (30 days ago)</span>", "sdfsdfsdf");
AddAntivirusOptionRow("s1", "sdf","Xsdfsdfsdf");
AddFirewallOptionRow("f", "Last full system scan: <span class=\"bold red\">7/10/2007 (30 days ago)</span>", "sdfsdfsdf");
AddFirewallOptionRow("f1", "sdf","Xsdfsdfsdf");
// AddAntivirusOptionRow("s2", "sdf","Xdfsdfsdf");
//
SetFirewallText("Header", "Details");
SetFirewallLaunchButtonVisible(false);
SetFirewallMoreInfoButtonVisible(true);
SetFirewallMoreInfoTextVisible(false)
//
// AddFirewallOptionRow("s", "Last full system scan:<span class=\"bold red\">7/10/2007 (30 days ago)</span>", "sdfsdfsdf");
// AddFirewallOptionRow("s1", "sdf","Ssdfsdfsdf");
// AddFirewallOptionRow("s2", "sdf","Ssdfsdfsdf");
SetFirewallStatus("0");
//
SetAntivirusSectionBusy(false);
SetFirewallSectionBusy(false);
SetAntivirusVerifyingVisible(true);
SetFirewallVerifyingVisible(true);
}
function i2()
{
SetFirewallMoreInfoButtonID(2323);
//SetAntivirusLaunchButtonVisible(true);
//SetAntivirusMoreInfoButtonVisible(false);
SetAntivirusMoreInfoTextVisible(true)
SetAntivirusMoreInfoText("Lorem ipsum dolor bsadfasd asdm ipsum dolor.");
EditAntivirusOptionRow("s", "XXXXX", "XXXYYYYYYYY");
EditAntivirusOptionRow("s1", "Last full system scan: <span class=\"bold red\">7/10/2007 (30 days ago)</span>", "2222");
EditFirewallOptionRow("f", "XXXXX", "XXXYYYYYYYY");
EditFirewallOptionRow("f1", "Last full system scan: <span class=\"bold red\">7/10/2007 (30 days ago)</span>", "2222");
//SetAntivirusOptionsVisible(true);
//SetFirewallLaunchButtonVisible(true);
//SetFirewallMoreInfoButtonVisible(false);
SetFirewallMoreInfoTextVisible(true)
SetFirewallMoreInfoText("Lorem ipsum dolor bsadfasd asdm ipsum dolor.");
EditFirewallOptionRow("s1", "XXXXX", "CCYYYYYYY");
EditFirewallOptionRow("s2", "Last full system scan: <span class=\"bold red\">7/10/2007 (30 days ago)</span>", "2222");
SetFirewallStatus("1");
SetAntivirusSectionBusy(true);
SetFirewallSectionBusy(true);
SetAntivirusVerifyingVisible(false);
SetFirewallVerifyingVisible(false);
}
function i3()
{
SetFirewallStatus("0");
SetAntivirusOptionsVisible(false);
SetFirewallOptionsVisible(false);
SetFirewallSectionAnalyzing(false);
SetAntivirusSectionAnalyzing(false);
}
function i4()
{
SetFirewallSectionAnalyzing(true);
SetAntivirusSectionAnalyzing(true);
}
//***********************************Set Language*************************//
function SetLanguage (language)
{
Get("spLOC_AntiVirus").innerHTML = spLOC_AntiVirus;
Get("spLOC_AVConfirmMsg").innerHTML = spLOC_AVConfirmMsg;
Get("pLOC_LoadingAV").innerHTML = pLOC_LoadingAV;
Get("pLOC_LoadingAVDetails").innerHTML=pLOC_LoadingAVDetails;
Get("spLOC_FWConfirmMsg").innerHTML = spLOC_FWConfirmMsg;
Get("spLOC_FireWall").innerHTML = spLOC_FireWall;
Get("pLOC_LoadingFW").innerHTML = pLOC_LoadingFW;
Get("pLOC_LoadingFWDetails").innerHTML=pLOC_LoadingFWDetails;
}